package com.ssy.lingxi.order.model.vo.common.response;

import com.ssy.lingxi.order.model.constant.OrderServiceContants;
import com.ssy.lingxi.order.utils.NumberUtil;
import com.ssy.lingxi.order.utils.OrderStringUtil;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author 万宁
 * @version 2.0.0
 * @date 2021-10-25
 */
public class MobileOrderProductHistoryQueryVO implements Serializable {
    private static final long serialVersionUID = 1254631182198438263L;

    public MobileOrderProductHistoryQueryVO() {
    }

    public MobileOrderProductHistoryQueryVO(LocalDateTime createTime, Long buyerMemberId, String buyerMemberName, BigDecimal quantity, String unit) {
        this.logo = "";
        this.createTime = createTime.format(OrderServiceContants.DEFAULT_TIME_FORMATTER);
        this.buyerMemberId = buyerMemberId;
        this.buyerMemberName = OrderStringUtil.coverString(buyerMemberName);
        this.quantity = NumberUtil.formatToInteger(quantity);
        this.unit = unit;
    }

    /**
     * 采购会员Logo
     */
    private String logo;

    /**
     * 交易时间，格式为yyyy-MM-dd HH:mm:ss
     */
    private String createTime;

    /**
     * 采购会员Id
     */
    private Long buyerMemberId;

    /**
     * 买家（采购商）名称
     */
    private String buyerMemberName;

    /**
     * 成交数量
     */
    private String quantity;

    /**
     * 商品计价单位
     */
    private String unit;

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Long getBuyerMemberId() {
        return buyerMemberId;
    }

    public void setBuyerMemberId(Long buyerMemberId) {
        this.buyerMemberId = buyerMemberId;
    }

    public String getBuyerMemberName() {
        return buyerMemberName;
    }

    public void setBuyerMemberName(String buyerMemberName) {
        this.buyerMemberName = buyerMemberName;
    }

    public String getQuantity() {
        return quantity;
    }

    public void setQuantity(String quantity) {
        this.quantity = quantity;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }
}
